package com.tm.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author huangp
 * @create 2021-09-12 11:24
 */
@ApiModel(value = "天马-OA 部门 实体类",description = "天马-OA 实体类")
@TableName("t_dept")
@HeadRowHeight(value = 35)
@ContentRowHeight(value = 25)
public class Dept {
    @ApiModelProperty(value = "主键",required = true,dataType = "number")
    @TableId(type = IdType.AUTO)
    @ExcelProperty(value = {"部门信息","部门编号"},order = 1)
    private Integer id;

    @ApiModelProperty(value = "部门名称",required = true,dataType = "String")
    @ExcelProperty(value = {"部门信息","部门名称"},order = 2)
    private String name;

    @ApiModelProperty(value = "上级部门",required = true,dataType = "number")
    @ExcelProperty(value = {"部门信息","上级部门"},order = 3)
    private Integer pid;

    @ApiModelProperty(value = "部门领导",required = true,dataType = "number")
    @ExcelProperty(value = {"部门信息","部门领导"},order = 4)
    private Integer leaderId;

    @ApiModelProperty(value = "部门电话",required = true,dataType = "String")
    @ExcelProperty(value = {"部门信息","部门电话"},order = 5)
    private String tel;

    @ApiModelProperty(value = "部门邮箱",required = true,dataType = "String")
    @ExcelProperty(value = {"部门信息","部门邮箱"},order = 6)
    private String email;

    @ApiModelProperty(value = "部门传真",required = true,dataType = "String")
    @ExcelProperty(value = {"部门信息","部门传真"},order = 7)
    private String fax;

    @ApiModelProperty(value = "备注",required = true,dataType = "String")
    @ExcelProperty(value = {"部门信息","备注"},order = 8)
    private String remark;

    @ApiModelProperty(value = "排序",required = true,dataType = "String")
    @ExcelProperty(value = {"部门信息","排序"},order = 9)
    private Integer sortNumber;

    @ApiModelProperty(value = "创建时间",required = true,dataType = "Date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelProperty(value = {"部门信息","创建时间"},order = 10)
    @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy-MM-dd HH:mm:ss" )
    private Date createDate;

    @ApiModelProperty(value = "修改时间",required = true,dataType = "Date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelProperty(value = {"部门信息","修改时间"},order = 11)
    @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy-MM-dd HH:mm:ss" )
    private Date updateDate;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getLeaderId() {
        return leaderId;
    }

    public void setLeaderId(Integer leaderId) {
        this.leaderId = leaderId;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getSortNumber() {
        return sortNumber;
    }

    public void setSortNumber(Integer sortNumber) {
        this.sortNumber = sortNumber;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
}
